Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/bring back tau #121

Merged
merged 17 commits into from
Apr 10, 2024
Merged

Feat/bring back tau #121

merged 17 commits into from
Apr 10, 2024

Conversation

kinrezC
Copy link
Contributor

@kinrezC kinrezC commented Apr 5, 2024

Adds CoveredCall strategy which is effectively a LogNormal strategy with tau reintroduced

Some considerations:

  • I added a single change to the pool struct, which is to add the uint256 lastSwapTimestamp. This value is uniquely updated in swap and init, but nowhere else. It is rewritten to the current block.timestamp every time a swap succeeds.
  • The solver includes a unique getPoolParamsCustomTimestamp in order for users to be able to solve for swaps/price given that the lastSwapTimestamp value is virtual but does impact the effective price and/or swap outputs in the future.
  • The computePriceGiven*L functions return a value up to 1e-9 precision. This is relevant because this value is used to compute deltaLiquidity inside of the swap function. The outcome is effectively that users will pay slightly more or less fees given a swap. This can always be accounted for by setting a slightly lower or higher swapFee for a given CoveredCall pool.

@kinrezC kinrezC added the 🚧 DO NOT MERGE 🚧 Do not merge label Apr 5, 2024
@kinrezC kinrezC changed the base branch from main to feat/v0.3.0 April 10, 2024 18:15
@kinrezC kinrezC marked this pull request as ready for review April 10, 2024 18:16
@kinrezC kinrezC force-pushed the feat/bring-back-tau branch from 6f7d6fa to 93c049d Compare April 10, 2024 18:26
@kinrezC kinrezC merged commit 6874aca into feat/v0.3.0 Apr 10, 2024
@kinrezC kinrezC deleted the feat/bring-back-tau branch April 10, 2024 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant